<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .wrap{
            width: 300px;
            height: 300px;
            background: pink;

            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            top: 0;
            margin: auto;
        }

        .inner{
            width: 200px;
            height: 200px;
            background: gray;

            /*
            left默认值:auto
            right默认值:auto
            width : auto
            height: auto
            padding : 0
            border  : 0
            margin  : 0

            inner横向上的 盒模型相关的尺寸 + left + right = wrap.padding-box横向上的尺寸
            inner纵向上的 盒模型相关的尺寸 + top + bottom = wrap.padding-box纵向上的尺寸
            */

            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            top: 0;
            margin: auto;
        }
    </style>
</head>
<body>
    <div id="app">
       <div class="wrap" @click="wrapFn">
           <div class="inner" @click="innerFn">

           </div>
       </div>
    </div>
</body>
</html>